<div class="tableToolbar">
    <div class="coll-md-8" id="addInput">
        <div class="coll-md-1">
            <input type="text" class='search' placeholder="支付方" ng-model="ctrlScope.itemsearch.payUsername">
        </div>
        <div class="coll-md-1">
            <input type="text" class='search' placeholder="收账方" ng-model="ctrlScope.itemsearch.receiveUsername">
        </div>
        <div class="coll-md-1">
            <input type="text" class='search' placeholder="流水号" ng-model="ctrlScope.itemsearch.orderNo">
        </div>
        <div class="coll-md-4 scalenone"  id="searchdate" datahide>
            <div class="coll-md-5" >
                <p class="input-group">
                    <input type="text" class="search" placeholder="添加开始时间" uib-datepicker-popup="yyyy-MM-dd"
                           ng-model="ctrlScope.itemsearch.beginDateTimex" is-open="popup1.opened" datepicker-options="dateOptions"/>
						<span class="input-group-btn">
							            <button type="button" class="small-icon btn btn-default" ng-click="open1()"><i
                                                class="glyphicon glyphicon-calendar"></i></button>
							          </span>
                </p>
            </div>
            <div class="coll-md-5">
                <p class="input-group inline">
                    <input type="text" class="search" placeholder="添加结束时间" uib-datepicker-popup="yyyy-MM-dd"
                           ng-model="ctrlScope.itemsearch.endDateTimex" is-open="popup2.opened" datepicker-options="dateOptions"/>
						<span class="input-group-btn">
							            <button type="button" class="small-icon btn btn-default" ng-click="open2()"><i
                                                class="glyphicon glyphicon-calendar"></i></button>
							          </span>
                </p>
            </div>
        </div>
        <div class="coll-md-1">
            <input type="button" class="small-icon search2-icon" value="搜索" ng-click="search()">
            <input type="button" class="small-icon search2" value="搜索">
            <input type="button" class="small-icon reset-icon" reset-icon value="重置" ng-click="reset()">
            <input type="button" class="small-icon reset" value="重置">

            <div class="dropdown-menu-right">
                <input type="button" class="small-icon more-icon" value="更多" title='更多搜索项' id="more-icon" data-toggle="dropdown"
                       aria-haspopup="true" aria-expanded="false">
                <input type="button" class="small-icon more" value="更多">
                <ul class="dropdown-menu" style='margin-left:80px;' aria-labelledby="dropdownMenu2" more-search>
                    <li><a href="javascript:;">日期搜索</a></li>
                </ul>
            </div>
        </div>
    </div>
    <div class="coll-md-2">
        <input type="button" class="bttn"  ng-click="addOrderModal()" value="调账">
        <input type="button" class="bttn"  ng-click="addTransferModal()" value="转账">
        <input type="button" class="bttn"  ng-click="checkAccount()" value="实名用户账单">
       <button class="small-icon btn btn-default pos-right" id="itemExport" ng-click="download()">
            <i class="fa fa-download" ></i>
        </button>
    </div>
</div>
<table ui-table="orderParams">
    <thead>
    <tr>
        <th>支付方</th>
        <th>收账方</th>
        <th>流水号</th>
        <th>金额(元)</th>
        <!--<th>调账类型</th>-->
        <th>备注</th>
        <th>状态</th>
        <th>添加时间</th>
        <!--<th>操作</th>-->
    </tr>
    </thead>
    <tbody>
    <tr ng-repeat="item in orderParams.$rows">
        <td>
            <span ng-if="item.payUsername">{{item.payUsername}}</span>
            <span ng-if="item.payRealname">{{item.payRealname}}</span>
        </td>
        <td>
            <span ng-if="item.receiveUsername">{{item.receiveUsername}}</span>
            <span ng-if="item.receiveRealname">{{item.receiveRealname}}</span>
        </td>
        <td>{{item.orderNo}}</td>
        <td>{{item.amount}}</td>
        <!--<td>{{item.operType}}</td>-->
        <td>{{item.remark}}</td>
        <td>{{item.status | rechargeStatus}}</td>
        <td>{{item.addtime | date:'yyyy-MM-dd HH:mm:ss'}}</td>
        <!--<td>-->
        	<!--<a  ng-click="modifyModal(item.orderNo)">编辑</a>-->
        <!--</td>-->
    </tr>
    </tbody>
</table>
<modal title="调账" visible="addModal">
    <form class="form-horizontal" role="form" name="myForm" ng-submit="adoptAdd(myForm.$valid)" novalidate>
        <div class="form-body">
            <div class="row">
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">付款方：</label>
                        <div class="col-md-8">
                            <input  style='width:50%;float:left' placeholder="请输入付款方Id" type="text" class="form-control" ng-model="add.fromId" required  ng-blur="isRegister(1,add.fromId)"><input style="width:45%;float: right" ng-model="add.fromName" placeholder="付款方用户名" disabled/>
                        </div>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">收账方：</label>
                        <div class="col-md-8">
                            <input  style='width:50%;float:left' placeholder="请输入收账方Id" type="text" class="form-control" ng-model="add.toId" required  ng-blur="isRegister(2,add.toId)"><input style="width:45%;float: right" ng-model="add.toName" placeholder="收账方用户名" disabled/>
                        </div>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">金额：</label>
                        <div class="col-md-8 yuan">
                            <input type="text" class="form-control" onkeyup="this.value=this.value.replace(/[^\d.]/g,'')" onafterpaste="this.value=this.value.replace(/[^\d.]/g,'')" maxlength="10" ng-model="add.amount" required>
                        </div>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">安全密码：</label>
                        <div class="col-md-8">
                            <input type="password" class="form-control" maxlength="16" ng-model="add.password" required>
                        </div>
                    </div>
                </div>
                <!--<div class="col-md-12">-->
                    <!--<div class="form-group">-->
                        <!--<label class="control-label col-md-2">备注：</label>-->
                        <!--<div class="col-md-10">-->
                            <!--<textarea ng-model="add.remark" class="form-control"></textarea>-->
                        <!--</div>-->
                    <!--</div>-->
                <!--</div>-->
            </div>
            <div class="buttonArea col-md-12">
                <button type="submit" class="btn blue" ng-disabled="myForm.$invalid">确认</button>
            </div>

        </div>
    </form>
</modal>

<modal title="转账" visible="transferModal">
    <form class="form-horizontal" role="form" name="myForm" ng-submit="transferSubmit(myForm.$valid)" novalidate>
        <div class="form-body">
            <div class="row">
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">付款方：</label>
                        <div class="col-md-8">
                            <input  style='width:50%;float:left' placeholder="请输入付款方Id" type="text" class="form-control" ng-model="transfer.fromId" required  ng-blur="isRegister(1,transfer.fromId)"><input style="width:45%;float: right" ng-model="transfer.fromName" placeholder="付款方用户名" disabled/>
                        </div>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">收账方：</label>
                        <div class="col-md-8">
                            <input  style='width:50%;float:left' placeholder="请输入收账方Id" type="text" class="form-control" ng-model="transfer.toId" required  ng-blur="isRegister(2,transfer.toId)"><input style="width:45%;float: right" ng-model="transfer.toName" placeholder="收账方用户名" disabled/>
                        </div>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">金额：</label>
                        <div class="col-md-8 yuan">
                            <input type="text" class="form-control" onkeyup="this.value=this.value.replace(/[^\d.]/g,'')" onafterpaste="this.value=this.value.replace(/[^\d.]/g,'')" maxlength="10" ng-model="transfer.amount" required>
                        </div>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">安全密码：</label>
                        <div class="col-md-8">
                            <input type="password" class="form-control" maxlength="16" ng-model="transfer.password" required>
                        </div>
                    </div>
                </div>
                <!--<div class="col-md-12">-->
                <!--<div class="form-group">-->
                <!--<label class="control-label col-md-2">备注：</label>-->
                <!--<div class="col-md-10">-->
                <!--<textarea ng-model="add.remark" class="form-control"></textarea>-->
                <!--</div>-->
                <!--</div>-->
                <!--</div>-->
            </div>
            <div class="buttonArea col-md-12">
                <button type="submit" class="btn blue" ng-disabled="myForm.$invalid">确认</button>
            </div>

        </div>
    </form>
</modal>